
import xbmc,xbmcplugin,xbmcgui,xbmcaddon
addonID = 'script.audio.radioparadise_com'
addon = xbmcaddon.Addon(addonID)

maxSoundQuality=addon.getSetting("maxSoundQuality")

if maxSoundQuality == "64k MP3":
	file = 'http://www.radioparadise.com/m3u/mp3-64.m3u'
elif maxSoundQuality == "128k MP3":
	file = 'http://www.radioparadise.com/m3u/mp3-128.m3u'
elif maxSoundQuality == "192k MP3":
	file = 'http://www.radioparadise.com/m3u/mp3-192.m3u'
elif maxSoundQuality == "64k AAC+":
	file = 'http://www.radioparadise.com/m3u/aac-64.m3u'
elif maxSoundQuality == "128k AAC+":
	file = 'http://www.radioparadise.com/m3u/aac-128.m3u'

# tell xbmc to play our file we specified in the above variable
xbmc.Player().play(file)

tag = xbmc.Player().getMusicInfoTag()
artist = tag.getArtist()
title = tag.getTitle()

class BlahMainWindow(xbmcgui.Window):
    # and define it as self
    def __init__(self):
    # add picture control to our window (self) with a hardcoded path name to picture
    self.addControl(xbmcgui.ControlImage(0,0,720,480, 'http://www4.radioparadise.com/graphics/tv_img/15720.jpg'))

# store our window as a short variable for easy of use
W = BlahMainWindow()
# run our window we created with our background jpeg image
W.doModal()
# after the window is closed, Destroy it.
del W